/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticketmaster.util;

/**
 *
 * @author Wei Liu
 */
public class Converter
{
    public static int BooleanToInt(boolean bool)
    {
        if(bool == true)
            return 1;
        else
            return 0;
    }

    public static int BooleanToInt(String bool)
    {
        if(bool.equals("true"))
            return 1;
        else
            return 0;
    }

    public static String BooleanToIntString(String bool)
    {
        if(bool.equals("true"))
            return "1";
        else
            return "0";
    }

    public static boolean parseBoolean(int i)
    {
        if(i == 0)
            return false;
        else if(i == 1)
            return true;

        return true;
    }
}
